/*
 * @Author: coderzhaolu && izhaicy@163.com
 * @Date: 2022-07-21 13:57:54
 * @LastEditors: coderzhaolu && izhaicy@163.com
 * @LastEditTime: 2022-08-19 17:41:38
 * @FilePath: /pinkmoe_vitesse/src/api/post/types.ts
 * @Description: https://github.com/Coder-ZhaoLu/pinkmoe 
 * 问题反馈qq群:749150798
 * PinkMoe主题上所有内容(包括但不限于 文字，图片，代码等)均为指针科技原创所有，采用请注意许可
 * 请遵循 “非商业用途” 协议。商业网站或未授权媒体不得复制内容，如需用于商业用途或者二开，请联系作者捐助任意金额即可，我们将保存所有权利。
 * Copyright (c) 2022 by 指针科技, All Rights Reserved.
 */
import type { ResAuthor, ResPost } from '/@/api/home/types'
import type { BaseResponseType, ReqPage } from '/@/api/common/types'
import type { ResFile } from '../upload/types'

export interface ReqPostItem {
  postId?: string | string[]
}

export interface ReqBbsPost extends ReqPage {
  type?: string
  category?: string
  author?: string // 作者筛选
  userId?: string // 收藏查询所需
}

export interface ReqPostDownloadPost {
  name?: string
  url?: string
  unpackPwd?: string
  extractPwd?: string
  price?: number
  priceType?: string
}

export interface ReqPostVideoPost {
  name?: string
  url?: string
  subtitles?: string
  price?: number
  priceType?: string
}

export interface ReqPostMusicPost {
  name?: string
  url?: string
  price?: number
  priceType?: string
}

export interface ReqPublishPost extends BaseResponseType {
  postId?: string
  title?: string
  exerpt?: string
  content?: string
  category?: string
  author?: string
  cover?: string
  postImg?: Array<ResFile>
  type?: string
  view?: number
  from?: string
  videoRelation?: Array<ReqPostVideoPost>
  musicRelation?: Array<ReqPostMusicPost>
  downloadRelation?: Array<ReqPostDownloadPost>
  status?: string
  topic?: Array<string>
  commentStatus?: string
}

export interface ReqBbsActive extends ReqPage {
  content?: string
  title?: string
  type?: string
  author?: string
}

export interface ResPostItem {
  authorPosts?: Array<ResPost>
  comments?: Array<ResComment>
  post?: ResPost
  users?: Array<ResAuthor>
  commentCount?: number
  fansCount?: number
  followCount?: number
  followStatus?: boolean
  postCount?: number
}

export interface ResBbsSilder {
  comments?: Array<ResComment>
  users?: Array<ResAuthor>
}

export interface ResComment extends BaseResponseType {
  ID?: number
  children?: Array<ResComment>
  content?: string
  formUid?: string
  parentId?: number
  postId?: string
  status?: string
  toUid?: string
  type?: string
  postRelation?: ResPost
  ToUidRelation?: ResAuthor
  FormUidRelation?: ResAuthor
}
